package com.showsu.editor.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.showsu.editor.entity.doo.VipGoods;
import com.showsu.editor.entity.doo.VipOrder;
import com.showsu.editor.entity.po.TblVipOrder;
import com.showsu.editor.entity.vo.request.RequestVO;

/**
 * @Author: William
 * @Description:
 * @Date: Created in 6:51 下午 2024/9/27
 * @Modified By:
 */
public interface IVipOrderService extends IService<TblVipOrder> {

    /**
     * 新建订单
     * @param userId 用户id
     * @param vipGoods 商品信息
     * @param clientInfo 请求的客户端信息
     * @return
     */
    VipOrder save(Long userId, VipGoods vipGoods, RequestVO clientInfo);

    /**
     * 根据订单号查询订单
     * @param orderTradeNo
     * @return
     */
    VipOrder queryByOrderTradeNo(String orderTradeNo);

    /**
     * 更新订单信息
     * @param id
     * @param tradeNo
     * @param appId
     * @param status
     * @param remark
     * @return
     */
    int updateVipOrder(Long id, String tradeNo, String appId, Integer status, String remark);
}
